﻿using PMS.Core.Configuration.CommonEnumConfigs;

namespace PMS.Data.Entities.Messages
{
    /// <summary>
    /// Represents an email account
    /// 发送邮件账号信息：默认采用阿里云DirectMail邮件推送服务
    /// </summary>
    public partial class EmailAccount : BaseEntity
    {
        /// <summary>
        /// Gets or sets an email address
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// 设置回信地址
        /// </summary>
        public string ReplyTo { get; set; }

        public EmailAccountType EmailAccountType { get; set; }

        public EmailSenderType EmailSenderType { get; set; }
        /// <summary>
        /// Gets or sets an email display name
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// Gets or sets an email host
        /// </summary>
        public string Host { get; set; }

        /// <summary>
        /// Gets or sets an email port
        /// </summary>
        public int Port { get; set; }

        /// <summary>
        /// Gets or sets an email user name
        /// 默认使用阿里云邮件推送服务：
        /// 阿里云邮件推送的邮件服务器为 smtpd，所以需要进行用户认证（要求认证用户名和发件人必须一致），
        /// 认证用户名(就是发件人)和密码可以通过控制台进行设置。
        /// </summary>
        public string Username { get; set; }

        /// <summary>
        /// Gets or sets an email password
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// Gets or sets a value that controls whether the SmtpClient uses Secure Sockets Layer (SSL) to encrypt the connection
        /// </summary>
        public bool EnableSsl { get; set; }
    }
}
